﻿using System.Windows;
using DynamicVm.Wpf;

namespace BasicVmDemo
{
    class MainViewModel : WpfViewModel
    {
        public MainViewModel()
        {
            Self.Name = "Name..";
            Self.ShowName = Command(ShowNameAction, () => !string.IsNullOrWhiteSpace(Self.Name));
        }

        public void ShowNameAction()
        {
            //the idea is show the command function, do no this in home
            MessageBox.Show(Self.Name);
        }
    }
}
